Encrypted DM reader, batch profiles, liked tweets, more human-like delays#7
Encrypted DM reader, batch profiles, liked tweets, more human-like delays#7jackordman wants to merge 4 commits intonirholas:mainfrom
Conversation
- Replace uniform random delays (1-3s) with log-normal distribution (2-7s) plus ~8% distraction spikes (8-20s) in scrapers and MCP local-tools - Add scrapeLikedTweets() to scrape a user's liked tweets page, with optional username (auto-resolves from config or page nav sidebar) - Save resolved username to ~/.xactions/config.json for future use - Wire x_get_likes MCP tool to use scrapeLikedTweets (single source of truth) - Add checkAuth() post-navigation guard for bookmarks and likes scrapers - Fix browser hang on auth failure with try/finally in unified scrape() - Auto-login in MCP ensureBrowser() when XACTIONS_SESSION_COOKIE is set - Resolve username on xactions login and clear on logout - Restore missing client files (parsers, search, trends, TwoFactorAuth) that were deleted but still imported, breaking MCP server startup - Add DEFAULT_FIELD_TOGGLES back to graphqlQueries.js - Update CLAUDE.md with sequential-request rule and delay documentation
|
@jackordman is attempting to deploy a commit to the aryllyraaryl-6220's projects Team on Vercel. A member of the Team first needs to authorize it. |
03f7cde to
9140aaa
Compare
Batch profile scraping with human-like delays between navigations, avoiding robotic browse patterns when fetching multiple profiles.
Move x_get_likes out of xeepyTools (Python shim) since it's handled
directly by local-tools. Wrap return value in { likedTweets, count,
username } at the local-tools layer and remove redundant double-wrapping
in the MCP server handler.
Add Puppeteer-based encrypted DM scraper module with passcode gate handling, conversation list scraping, and message extraction with sender detection. Wire into MCP tools (x_read_dms, x_export_dms, x_get_conversations) and CLI (dms list/read/export). - skipNavigation option avoids redundant /messages nav in export loops - Defensive back-navigation when split-pane sidebar collapses - Fuzzy matching constrained to display name elements only - Transparent background skip in sender color detection - Document CLAUDE.md stealth infrastructure requirement
9140aaa to
ee90cf7
Compare
|
Thank you! Will get to these as soon as i can. Looks great from what I saw at first glance. I appreciate it. |
|
Hey @jackordman, thanks for this — solid work overall. I'd like to take the safe improvements now and split the DM features into a follow-up PR. Here's what I need: Please split this into two PRs: PR 1 — Bug fixes & improvements (merge now): Log-normal randomDelay() distribution PR 2 — DM features (needs changes before merge): Encrypted DM scraper, MCP tools, CLI commands No issues with the DM scraper itself — the sender detection heuristic and passcode gate handling look good for a v1. |
|
@nirholas No problem! Just some stuff I put together while messing around. I'll make these changes when I find some time after work this week |
Summary
Four commits covering encrypted DM support, new scraping capabilities, anti-detection improvements, and bug fixes.
Encrypted DM reader (
src/scrapers/twitter/dm.puppeteer.js)/i/chat/pin/recoveryredirect), conversation list scraping, message extraction with sender detection, and media detectionx_read_dms,x_export_dms,x_get_conversationsxactions dms list,dms read <username>,dms exportwith interactive passcode prompt and optional saveskipNavigationoptimization avoids redundant/messagesnavigation in export loops/i/chat(new Tailwind UI) and/messages(legacy) DOM structuresBatch profile scraping (
x_get_profiles)Liked tweets scraping (
scrapeLikedTweets)scrapeLikedTweets()scraper with optional username (auto-resolves from config or sidebar)x_get_likesMCP tool wired to use it as single source of truth{ likedTweets, count, username }Human-like delays and anti-detection
randomDelayin local-tools.js — now imported from scrapers moduleAuth and reliability fixes
checkAuth()post-navigation guard for bookmarks and likes scrapersensureBrowser()whenXACTIONS_SESSION_COOKIEis setscrape()xactions login, clear on logoutRestored missing client files
parsers.js,search.js,trends.js,TwoFactorAuth.js,DEFAULT_FIELD_TOGGLES— were deleted but still imported, breaking MCP server startupTest plan
x_get_conversations— returns conversations with names + handlesx_read_dms— returns messages with sender detection, text, time, mediax_export_dms— loops multiple conversations via skipNavigationx_get_likes— returns wrapped object, no double-wrappingdms list/read/export --helpparses correctly